//
//  BGBuyerListTableViewCell.m
//  bigMall
//
//  Created by LTOVE on 16/9/9.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGBuyerListTableViewCell.h"
static NSString *const reuseIdentify = @"cell";
@implementation BGBuyerListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setModel:(BGShellerOrderListListAddayModel *)model
{
    _model = model;
    
    //设置所有子控件
    [self setUpAllSubViewsWithModel:model];
}

- (void)setUpAllSubViewsWithModel:(BGShellerOrderListListAddayModel *)model
{
    for (UIView *view in self.contentView.subviews) {
        [view removeFromSuperview];
    }
    //内容视图
    UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, screenW, 197)];
    //分割线
    UIView *cellLineView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, screenW, 10)];
    cellLineView.backgroundColor = dockwhite_;
    [contentView addSubview:cellLineView];
    //订单编号
    
    //副标题
    
    //分割线- 细- 上
    
    //标题
    
    //日趋
    
    //单价
    
    //竖向分割线
    
    //数量
    
    //交割地图标
    
    //交割地
    
    //提货方式图标
    
    //提货方式
    
    //下部分割线
    
    //总价
    
}
- (NSMutableAttributedString *)attrStrWithStr:(NSString *)str withColor:(UIColor *)color
{
    NSDictionary *dic = @{
                          NSFontAttributeName:Font34,
                          NSForegroundColorAttributeName:textBlackColor
                          };
    NSMutableAttributedString *attr = [[NSMutableAttributedString alloc]initWithString:str attributes:dic];
    NSRange rang = [str rangeOfString:@":"];
    NSDictionary *secDic = @{
                             NSFontAttributeName:Font30,
                             NSForegroundColorAttributeName:color
                             };
    [attr addAttributes:secDic range:NSMakeRange(rang.location + 1, str.length -1 - rang.location)];
    return attr;
}
+ (instancetype)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    BGBuyerListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentify forIndexPath:indexPath];
    if (!cell) {
        cell = [[self alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentify];
    }
    return cell;
}

@end
